// pages/probabilityAnalysis/probabilityAnalysis.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    variableData: [
      {scope:'0',variableOne:'235',operation:'有0的筛选'},
      {scope:'1',variableOne:'235',operation:'有1的筛选'},
      {scope:'2',variableOne:'235',operation:'2的筛选'},
      {scope:'3',variableOne:'235',operation:'3的筛选'},
      {scope:'4',variableOne:'235',operation:'4以上'},
      {scope:'5',variableOne:'235',operation:''},
      { scope: '6', variableOne: '235', operation: '' },
      { scope: '7', variableOne: '235', operation: '' },
      { scope: '8', variableOne: '235', operation: '' },
      { scope: '9', variableOne: '235', operation: '' },
      { scope: '10', variableOne: '235', operation: '' }
      
    ],
    items1: [
      { name: 'USA', value: '变量1出现0' },
      { name: 'CHN', value: '变量2出现0', checked: 'true' },
      { name: 'BRA', value: '变量3出现0' },
      { name: 'JPN', value: '变量4出现0' },
      { name: 'ENG', value: '变量5出现0' },
      { name: 'FRA', value: '变量6出现0' },
    ],
    items2: [
      { name: 'USA', value: '变量1出现1' },
      { name: 'CHN', value: '变量2出现1', checked: 'true' },
      { name: 'BRA', value: '变量3出现1' },
      { name: 'JPN', value: '变量4出现1' },
      { name: 'ENG', value: '变量5出现1' },
      { name: 'FRA', value: '变量6出现1' },
    ],
    items3: [
      { name: 'USA', value: '变量1出现2' },
      { name: 'CHN', value: '变量2出现2', checked: 'true' },
      { name: 'BRA', value: '变量3出现2' },
      { name: 'JPN', value: '变量4出现2' },
      { name: 'ENG', value: '变量5出现2' },
      { name: 'FRA', value: '变量6出现2' },
    ],
    items4: [
      { name: 'USA', value: '变量1出现3' },
      { name: 'CHN', value: '变量2出现3', checked: 'true' },
      { name: 'BRA', value: '变量3出现3' },
      { name: 'JPN', value: '变量4出现3' },
      { name: 'ENG', value: '变量5出现3' },
      { name: 'FRA', value: '变量6出现3' },
    ],
    items5: [
      { name: 'USA', value: '变量1出现4' },
      { name: 'CHN', value: '变量2出现4', checked: 'true' },
      { name: 'BRA', value: '变量3出现4' },
      { name: 'JPN', value: '变量4出现4' },
      { name: 'ENG', value: '变量5出现4' },
      { name: 'FRA', value: '变量6出现4' },
    ],
    zeroNum: [
      { name: 'USA', value: '至少出现一个' },
      { name: 'CHN', value: '出现两个以上', checked: 'true' },
    ],
    isShowMask: false,
    index:0,
    array: ['方案一', '方案二', '方案三', '方案四'],
    isShowSelect: false,
    array1: ['0', '1', '2', '3', '4', '5','6','7','8','9','10'],
    index1:0,
    index2:1,
    index3:2,
    index4:3,
    index5:4,
    isShowSelect1:false,
    isShowSelect2: false,
    isShowSelect3: false,
    isShowSelect4: false,
    isShowSelect5: false,
    multiArray: [
      ['0', '1','2','3','4','5','6','7','8','9','10'],
      ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9','10']
    ],
    multiIndex1: [0, 10],
    multiIndex2: [0, 10],
    multiIndex3: [0, 10],
    multiIndex4: [0, 10],
    multiIndex5: [0, 10]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
 console.log(666)
  },
  bindMultiPickerColumnChange1: function(e) {
    console.log(e)
    console.log('修改的列为', e.detail.column, '，值为', e.detail.value);
    var data = {
      multiArray: this.data.multiArray,
      multiIndex1: this.data.multiIndex1
    };
    data.multiIndex1[e.detail.column] = e.detail.value;
    data.multiArray[1] =
      ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
console.log(data)
    this.setData(data);
  },
  bindMultiPickerColumnChange2: function(e) {
    console.log(e)
    console.log('修改的列为', e.detail.column, '，值为', e.detail.value);
    var data = {
      multiArray: this.data.multiArray,
      multiIndex2: this.data.multiIndex2
    };
    data.multiIndex2[e.detail.column] = e.detail.value;
    data.multiArray[1] =
      ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
console.log(data)
    this.setData(data);
  },
  bindMultiPickerColumnChange3: function(e) {
    console.log(e)
    console.log('修改的列为', e.detail.column, '，值为', e.detail.value);
    var data = {
      multiArray: this.data.multiArray,
      multiIndex3: this.data.multiIndex3
    };
    data.multiIndex3[e.detail.column] = e.detail.value;
    data.multiArray[1] =
      ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
console.log(data)
    this.setData(data);
  },
  bindMultiPickerColumnChange4: function(e) {
    console.log(e)
    console.log('修改的列为', e.detail.column, '，值为', e.detail.value);
    var data = {
      multiArray: this.data.multiArray,
      multiIndex4: this.data.multiIndex4
    };
    data.multiIndex4[e.detail.column] = e.detail.value;
    data.multiArray[1] =
      ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
console.log(data)
    this.setData(data);
  },
  bindMultiPickerColumnChange5: function(e) {
    console.log(e)
    console.log('修改的列为', e.detail.column, '，值为', e.detail.value);
    var data = {
      multiArray: this.data.multiArray,
      multiIndex5: this.data.multiIndex5
    };
    data.multiIndex5[e.detail.column] = e.detail.value;
    data.multiArray[1] =
      ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
console.log(data)
    this.setData(data);
  },
  bindMultiPickerColumnChange: function(e) {
    console.log(e)
    console.log('修改的列为', e.detail.column, '，值为', e.detail.value);
    var data = {
      multiArray: this.data.multiArray,
      multiIndex: this.data.multiIndex
    };
    data.multiIndex[e.detail.column] = e.detail.value;
    data.multiArray[1] =
      ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
console.log(data)
    this.setData(data);
  },
  bindTimeChange: function (e) {
    console.log('picker发送选择改变，携带值为', e.detail.value)
    this.setData({
      time: e.detail.value
    })
  },
  isShowInfo1 (e) {
      this.setData({
        isShowSelect1: true,
        isShowSelect2: false,
        isShowSelect3: false,
        isShowSelect4: false,
        isShowSelect5: false
      })

  },
  doneUp1 () {
    this.setData({
      isShowSelect1: false
    })
  },
  isShowInfo2 (e) {
    this.setData({
      isShowSelect1: false,
        isShowSelect2: true,
        isShowSelect3: false,
        isShowSelect4: false,
        isShowSelect5: false
    })

},
doneUp2 () {
  this.setData({
    isShowSelect2: false
  })
},
isShowInfo3 (e) {
  this.setData({
    isShowSelect1: false,
    isShowSelect2: false,
    isShowSelect3: true,
    isShowSelect4: false,
    isShowSelect5: false
  })

},
doneUp3 () {
this.setData({
  isShowSelect3: false
})
},
isShowInfo4 (e) {
  this.setData({
    isShowSelect1: false,
    isShowSelect2: false,
    isShowSelect3: false,
    isShowSelect4: true,
    isShowSelect5: false
  })

},
doneUp4 () {
this.setData({
  isShowSelect4: false
})
},
isShowInfo5 (e) {
  this.setData({
    isShowSelect1: false,
    isShowSelect2: false,
    isShowSelect3: false,
    isShowSelect4: false,
    isShowSelect5: true
  })

},
doneUp5 () {
this.setData({
  isShowSelect5: false
})
},
  radioChange: function (e) {
    console.log('radio发生change事件，携带value值为：', e.detail.value)
  },
  closeMask () {
    this.setData({
      isShowMask: false
    })
  },
  selectPlan () {
    this.setData({
      isShowMask: true
    })
  },
  bindPickerChange: function (e) {
    console.log('picker发送选择改变，携带值为', e.detail.value)
    this.setData({
      index: e.detail.value
    })
  },
  bindPickerChangeOne: function (e) {
    console.log('picker发送选择改变，携带值为', e.detail.value)
    this.setData({
      index1: e.detail.value
    })
  },
  bindPickerChangeTwo: function (e) {
    console.log('picker发送选择改变，携带值为', e.detail.value)
    this.setData({
      index2: e.detail.value
    })
  },
  bindPickerChangeThree: function (e) {
    console.log('picker发送选择改变，携带值为', e.detail.value)
    this.setData({
      index3: e.detail.value
    })
  },
  bindPickerChangeFour: function (e) {
    console.log('picker发送选择改变，携带值为', e.detail.value)
    this.setData({
      index4: e.detail.value
    })
  },
  bindPickerChangeFive: function (e) {
    console.log('picker发送选择改变，携带值为', e.detail.value)
    this.setData({
      index5: e.detail.value
    })
  }
})